package tat.domain;

import java.util.Observable;
import java.util.Observer;

import tat.util.Validate;

public class DomainModelRelationEndPoint extends Observable implements Observer{

    private TatClass tatClass;

    private String multiplicity;

    public DomainModelRelationEndPoint(final TatClass tatClass, final String multiplicity) {
        Validate.notNull(tatClass, "Tat class must not be null.");

        this.tatClass = tatClass;
        this.multiplicity = multiplicity;
    }

    public TatClass tatClass() {
        return tatClass;
    }

    public String multiplicity() {
        return multiplicity;
    }

	@Override
	public void update(Observable o, Object arg) {
		this.setChanged();
		this.notifyObservers();	
	}

}
